package wechat.base.snd;

import org.eclipse.xtend.lib.annotations.Accessors;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.Pure;
import org.json.JSONObject;

@SuppressWarnings("all")
public class WCSubButton {
  @Accessors
  private String type;
  
  @Accessors
  private String name;
  
  @Accessors
  private String key;
  
  @Accessors
  private String url;
  
  public JSONObject toJson() {
    JSONObject _jSONObject = new JSONObject();
    final Procedure1<JSONObject> _function = new Procedure1<JSONObject>() {
      public void apply(final JSONObject it) {
        try {
          it.put("type", WCSubButton.this.type);
          it.put("name", WCSubButton.this.name);
          it.put("key", WCSubButton.this.key);
          it.put("url", WCSubButton.this.url);
        } catch (Throwable _e) {
          throw Exceptions.sneakyThrow(_e);
        }
      }
    };
    return ObjectExtensions.<JSONObject>operator_doubleArrow(_jSONObject, _function);
  }
  
  @Pure
  public String getType() {
    return this.type;
  }
  
  public void setType(final String type) {
    this.type = type;
  }
  
  @Pure
  public String getName() {
    return this.name;
  }
  
  public void setName(final String name) {
    this.name = name;
  }
  
  @Pure
  public String getKey() {
    return this.key;
  }
  
  public void setKey(final String key) {
    this.key = key;
  }
  
  @Pure
  public String getUrl() {
    return this.url;
  }
  
  public void setUrl(final String url) {
    this.url = url;
  }
}
